SpringParams.this

Creates a new AdwSpringParams from @mass, @stiffness and @damping_ratio.

The damping value is calculated from @damping_ratio and the other two parameters.

* If @damping_ratio is 0, the spring will not be damped and will oscillate endlessly. * If @damping_ratio is between 0 and 1, the spring is underdamped and will always overshoot. * If @damping_ratio is 1, the spring is critically damped and will reach its resting position the quickest way possible. * If @damping_ratio is larger than 1, the spring is overdamped and will reach its resting position faster than it can complete an oscillation.

[ctor@SpringParams.new_full] allows to pass a raw damping value instead.

  1. this(AdwSpringParams* adwSpringParams, bool ownedRef)
  2. this(double dampingRatio, double mass, double stiffness)
    class SpringParams
    this
    (,
    double mass
    ,
    double stiffness
    )

Parameters

dampingRatio double

the damping ratio of the spring

mass double

the mass of the spring

stiffness double

the stiffness of the spring

Return Value

the newly created spring parameters

Throws

ConstructionException GTK+ fails to create the object.

Meta